# from . import db
# from sqlalchemy.dialects.mysql import TINYINT
# from datetime import datetime
#
# # 告警可视化图表+已修复告警可视化
# class DangerShow(db.Model):
#     __tablename__ = 'danger_show'
#
#     id = db.Column(db.String(36), primary_key=True, comment='主键ID(不同的异常事件)，UUID格式')
#     event_name = db.Column(db.String(128), nullable=False, comment='异常名称')
#     status = db.Column(TINYINT, nullable=False, default=0, comment='0=未处理, 1=已处理')
#     time = db.Column(db.DateTime, nullable=False, comment='告警时间，与alert_list表同步')
#
#     # 异常数据
#     time_data = db.Column(db.Text, nullable=False, comment='时间序列JSON数组')
#     value_data = db.Column(db.Text, nullable=False, comment='数值序列JSON数组')
#     danger_data = db.Column(db.Text, nullable=False, comment='告警时段数据JSON数组')
#     # 处理信息
#     work_note = db.Column(db.Text, nullable=True, comment='处理步骤JSON，未处理时为NULL')
#
#     # 添加索引
#     __table_args__ = (
#         db.Index('idx_id', 'id'),
#         db.Index('idx_status', 'status'),
#     )